<template>
    <div class="app" :class="[modelShowB && 'over-f']">
        <router-view @modelShow="modelShow"/>
    </div>
</template>

<script>
export default {
    name: 'App',
    data() {
        return {
            modelShowB: false,
            routeName: '' // 当前路由名字
        };
    },
    created() {
        const { name } = this.$route;
        this.routeName = name;
    },
    mounted() {
    },
    watch: {
        $route(to) {
            // （监听路由变化）控制tab显示
            this.routeName = to.name;
        }
    },
    methods: {
        modelShow(e) {
            this.modelShowB = e;
        }
    }
};
</script>

<style lang="less">
    /* .app {
        width: 100%;
        height: 100%;
    } */
    .over-f{
        // overflow: hidden;
        padding-right: 6px;
    }

</style>
